package com.ndp.fb.model.fbagent.result.entrustaccount;

import com.ndp.fb.model.fbagent.result.AbstractFacebookResult;
import com.restfb.Facebook;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;
import java.util.List;

/**
 * Created by Mikey.zhaopeng on 2014/10/25 10:30.
 * Email mikey.zhao@ndpmedia.com
 */
@Setter
@Getter
@NoArgsConstructor
public class EntrustAccounts  extends AbstractFacebookResult {
    @Facebook
    private String id;
    @Facebook("account_id")
    private String accountId;
    @Facebook("timezone_id")
    private Integer timezoneId;
    @Facebook("timezone_name")
    private String timezoneName;
    @Facebook("account_status")
    private Integer accountStatus;
    @Facebook("name")
    private String name;
    @Facebook("balance")
    private Integer balance;
    @Facebook("access_type")
    private String accessType;
    @Facebook("access_status")
    private String accessStatus;
    @Facebook("permitted_roles")
    private List<String> permittedRoles;
    @Facebook("tos_accepted")
    private String tosAccepted;
    @Facebook("capabilities")
    private List<String> capabilities;          //增加用来判定是否是大账号
    @Facebook("age")
    private float age;    //Amount of time the ad account has been open, in days 广告帐户打开的天数
    @Facebook("business_city")
    private String businessCity;                //City for business address
    @Facebook("business_country_code")
    private String businessCountryCode;         //Country code for the business address
    @Facebook("business_name")
    private String businessName;                //The business name for the account  帐户的商业名称
    @Facebook("business_state")
    private String businessState;               //State abbreviation for business address
    @Facebook("business_street")
    private String businessStreet;              //First line of the business street address for the account
    @Facebook("business_street2")
    private String businessStreet2;             //
    @Facebook("business_zip")
    private String businessZip;                 //邮编
    @Facebook("created_time")
    private Date createdTime;                   //该帐户的时间是在国际标准8601格式创建的
    @Facebook("currency")
    private String currency;                    //货币 eg. USD
    @Facebook("disable_reason")
    private int disableReason;                  //  0 = NONE   1 = ADS_INTEGRITY_POLICY  2 = ADS_IP_REVIEW  3 = RISK_PAYMENT  4 = GRAY_ACCOUNT_SHUT_DOWN
    @Facebook("funding_source")
    private String fundingSource;               //付款方式的标识。如果该帐户没有一个付款方式，它仍然可以创建广告，但这些广告将获得任何交付。
    @Facebook("funding_source_details")
    private FundingSourceDetails fundingSourceDetails;
    @Facebook("has_migrated_permissions")
    private boolean hasMigratedPermissions;     //有迁移权限
    @Facebook("is_personal")
    private int isPersonal;                     //0  If this is a personal or business account
    @Facebook("is_prepay_account")
    private boolean isprepayAccount;            //If this ad account is a prepay or postpay account 预付 后付账户
    @Facebook("is_tax_id_required")
    private boolean isTaxIdRequired;            //广告帐户的纳税标识是必需的 false
    @Facebook("min_campaign_group_spend_cap")
    private String minCampaignGroupSpendCap;    //竞选所需的最低上限
    @Facebook("min_daily_budget")
    private String minDailyBudget;              //广告帐户的最低每日预算
    @Facebook("owner")
    private String owner;                       //广告帐户的拥有者  id
    @Facebook("offsite_pixels_tos_accepted")
    private boolean offsitePixelsTosAccepted;   //异地。。
    /**
     * VAT status code for the account.
     0: Unknown
     1: VAT not required- US/CA
     2: VAT information required
     3: VAT information submitted
     4: Offline VAT validation failed
     5: Account is a personal account
     */
    @Facebook("tax_id_status")
    private int taxIdStatus;                    //增值税
    @Facebook("tax_id_type")
    private String taxIdType;                   //广告帐户的最低每日预算
    @Facebook("timezone_offset_hours_utc")
    private float timezoneOffsetHoursUtc;       //与国际时间的偏移
    @Facebook("rf_spec")
    private ReachFrequencySpec rfSpec;          //账户必须有CAN_USE_REACH_AND_FREQUENCY.能力
    @Facebook("user_role")
    private String userRole;                    //Role ID of the user
    @Facebook("amount_spent")
    private String amountSpent;                 //当前这个账号的总花费 int
    @Facebook("spend_cap")
    private String spendCap;                    //
    @Facebook("business")
    private Business business;                  //The Business Manager, if this ad account is owned by one.
    @Facebook("owner_business")
    private Business ownerBusiness;             //owner business of this object
    @Facebook("last_used_time")
    private Date lastUsedTime;                  //last used time of this object by the current viewer

    private String role;


    public void setIsTaxIdRequired(boolean taxIdRequired) {
        isTaxIdRequired = taxIdRequired;
    }
}
